package vn.lumi.smarthome.io.model;

import java.util.ArrayList;


public class Scene {
	private int id;
	private int room_id;
	private String name;
	private int state;
	private ArrayList<Integer> devices_id = new ArrayList<Integer> ();
	private ArrayList<DeviceState> devices_state = new ArrayList<DeviceState>();
	private int scene_mode = 0;
	private Time turnOnTime;
	/**
	 * Su dung khi xoa Scene
	 */
	private boolean isSelected=false;
	
	public static final int SCENE_STATE_ON = 2;
	public static final int SCENE_STATE_OFF = 1;
	
	public static final int SCENE_MODE_NORMAL =0;
	public static final int SCENE_MODE_AUTO = 1;
	
	public interface OnControlSceneListener{
		public void OnTurnOnScene(int sceneID);
		public void OnTurnOffScene(int sceneID);
	}
	
	public Scene() {
	}

	public Scene(int id, int room_id, String name, int state, ArrayList<Integer> devices_id, ArrayList<DeviceState> states, int mode, Time time) {
		super();
		this.id = id;
		this.room_id = room_id;
		this.name = name;
		this.state = state;
		this.devices_id = devices_id;
		this.devices_state = states;
		this.turnOnTime = time;
		this.scene_mode = mode;
	}

	public Scene(int id, int room_id, String name, int state, int mode, Time time) {
		super();
		this.id = id;
		this.room_id = room_id;
		this.name = name;
		this.state = state;
		this.turnOnTime = time;
		this.scene_mode = mode;
	}
	
	//devices id, state
	public  ArrayList<Integer> getDevicesId() {
		return devices_id;
	}

	public  ArrayList<DeviceState> getDevicesState() {
		return devices_state;
	}
	
	public void setDevicesId( ArrayList<Integer> devices_id) {
		this.devices_id = devices_id;
	}
	
	public void setDevicesState( ArrayList<DeviceState> devices_state) {
		this.devices_state = devices_state;
	}
	
	public void addDevice(int id, DeviceState dev_state){
		this.devices_id.add(id);
		this.devices_state.add(dev_state);
	}
	
	
	//time
	public Time getTurnOnTime(){
		return this.turnOnTime;
	}
	
	//mode
	public int getMode(){
		return this.scene_mode;
	}
	
	public boolean isSelected() {
		return isSelected;
	}

	public void setSelected(boolean isSelected) {
		this.isSelected = isSelected;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getRoom_id() {
		return room_id;
	}

	public void setRoom_id(int room_id) {
		this.room_id = room_id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}
	
	
	
	
}
